package com.fyy.absfactory;

import com.fyy.absfactory.color.BlueColor;
import com.fyy.absfactory.color.Color;
import com.fyy.absfactory.color.GreeColor;
import com.fyy.absfactory.color.RedColor;
import com.fyy.absfactory.shape.CircleDraw;
import com.fyy.absfactory.shape.RectangleDraw;
import com.fyy.absfactory.shape.Shape;
import com.fyy.absfactory.shape.SquareDraw;

/**
 * @Author fyy
 * @Description
 * @Date 2020/7/22 18:09
 */
public class ShapeFactory extends AbstractFactory{

    @Override
    public Color getColor(String color) {
        return null;
    }

    public Shape getShape(String shapeType){

        if(null == shapeType){
            return null;
        }

        switch (shapeType){
            case "RECTANGLE":
                return new RectangleDraw();
            case "SQUARE":
                return new SquareDraw();
            case "CIRCLE":
                return new CircleDraw();
        }

        return null;

    }

}
